package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface CommonMapper<T> extends BaseMapper<T> {

	@Select("${sql} limit #{pageIndex},#{pageSize}")
	public List<Map> findPageList(Map prams);

	@Select("${sql}")
	public List<Map> findList(Map prams);

	@Select("${sql} limit #{pageIndex},#{pageSize}")
	public List<T> findPageListEnty(Map prams);

	@Select("${sql}")
	public List<T> findListEnty(Map prams);

	@Select("${sql}")
	public List<Object> findObjList(Map prams);

	@Select("${sql}")
	public List<String> findStrList(Map prams);

	@Select("select count(*) from (${sql}) t")
	public int findListCount(Map prams);


	@Select("${sql}")
	public Map getMap(Map prams);

	@Select("${sql}")
	public String getString(Map prams);

	@Select("${sql}")
	public T getEnty(Map prams);
	@Select("${sql}")
	public T getEnty(String sql);
}
